home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CICA 1993 April
/
CICA MS Windows - April 1993.iso
/
unzipped
/
programr
/
listings
/
blxv1
/
ttime.cpp
< prev
next >
Wrap
Text File
|
1991-01-22
|
291b
|
14 lines
#include<time.h>
#include<iostream.h>
struct tm *time(void);
void main(void) {
time_t ttime = time(NULL);
struct tm *ltime = time();
cout << ctime(&ttime);
cout << asctime(ltime);
}
struct tm *time(void) {
time_t t = time(NULL);
return localtime(&t);
}